import request from '@/utils/request'
// -----------------------------------其他设置 satrt---------------------------
// 获取货币设置
export function getCurrency() {
  return request({
    url: '/otherSetting/getCurrency',
    method: 'post'
  })
}
// 保存货币设置
// { "data":2.1 }
export function setCurrency(data) {
  return request({
    url: '/otherSetting/setCurrency',
    method: 'post',
    data
  })
}
// 获取客服信息设置
export function getServiceInfo() {
  return request({
    url: '/otherSetting/getServiceInfo',
    method: 'post'
  })
}
// 获取客服信息设置
export function setServiceInfo(data) {
  return request({
    url: '/otherSetting/setServiceInfo',
    method: 'post',
    data
  })
}
// 获取关于我们
export function getAboutUs() {
  return request({
    url: '/otherSetting/getAboutUs',
    method: 'post'
  })
}
// 保存关于我们
export function setAboutUs(data) {
  return request({
    url: '/otherSetting/setAboutUs',
    method: 'post',
    data
  })
}
// 获取使用条款
export function getTermsOfUse() {
  return request({
    url: '/otherSetting/getTermsOfUse',
    method: 'post'
  })
}
// 保存使用条款
export function setTermsOfUse(data) {
  return request({
    url: '/otherSetting/setTermsOfUse ',
    method: 'post',
    data
  })
}
// 获取隐私政策
export function getPrivacyPolicy() {
  return request({
    url: '/otherSetting/getPrivacyPolicy',
    method: 'post'
  })
}
// 保存隐私正常
export function setPrivacyPolicy(data) {
  return request({
    url: '/otherSetting/setPrivacyPolicy ',
    method: 'post',
    data
  })
}
// 获取qa 文档
export function getQA() {
  return request({
    url: '/otherSetting/getQA',
    method: 'post'
  })
}
// 保存qa 文档
export function setQA(data) {
  return request({
    url: '/otherSetting/setQA ',
    method: 'post',
    data
  })
}
export function setApkVersion(data) {
  return request({
    url: '/otherSetting/setApkVersion',
    method: 'post',
    data
  })
}
export function getApkVersion() {
  return request({
    url: '/otherSetting/getApkVersion',
    method: 'post'
  })
}
export function setIosApkVersion(data) {
  return request({
    url: '/otherSetting/setIosApkVersion',
    method: 'post',
    data
  })
}
export function getIosApkVersion() {
  return request({
    url: '/otherSetting/getIosApkVersion',
    method: 'post'
  })
}
export function setContactUs(data) {
  return request({
    url: '/otherSetting/setContactUs',
    method: 'post',
    data
  })
}

export function getLegalDeclaration() {
  return request({
    url: '/otherSetting/getLegalDeclaration',
    method: 'post'
  })
}
export function setLegalDeclaration(data) {
  return request({
    url: '/otherSetting/setLegalDeclaration',
    method: 'post',
    data
  })
}

export function listSysLogData(data) {
  return request({
    url: '/otherSetting/listSysLogData',
    method: 'post',
    data
  })
}
export function getContactUs() {
  return request({
    url: '/otherSetting/getContactUs',
    method: 'post'
  })
}

// -----------------------------------其他设置 end ---------------------------

// -----------------------------------敏感词 start ---------------------------

export function getLimitStr() {
  return request({
    url: '/otherSetting/getLimitStr',
    method: 'post'
  })
}

export function setLimitStr(data) {
  return request({
    url: '/otherSetting/setLimitStr',
    method: 'post',
    data
  })
}

// -----------------------------------敏感词 end ---------------------------

/* -----------------------------常见问题，相关教程-----------------------------*/
// 列表
// type
// {
// 1, "常见问题"
// 2, "相关教程"
// }
export function getList(type) {
  return request({
    url: 'relevant/getList',
    method: 'post',
    data: {
      type
    }
  })
}

// 添加设置
export function add(data) {
  return request({
    url: 'relevant/add',
    method: 'post',
    data
  })
}

// 开关
export function status(data) {
  return request({
    url: '/relevant/update/status',
    method: 'post',
    data
  })
}

// 删除
export function del(data) {
  return request({
    url: '/relevant/batch/del',
    method: 'post',
    data
  })
}

// 修改
export function update(data) {
  return request({
    url: '/relevant/update',
    method: 'post',
    data
  })
}

// 排序
export function sort(data) {
  return request({
    url: '/relevant/update/sort',
    method: 'post',
    data
  })
}

/* -----------------------------常见问题，相关教程 end-----------------------------*/

/** *未成年退款协议***/
export function getMinorRefund(data) {
  return request({
    url: '/otherSetting/getMinorRefund',
    method: 'post',
    data
  })
}

export function setMinorRefund(data) {
  return request({
    url: '/otherSetting/setMinorRefund',
    method: 'post',
    data
  })
}

// 操作日志
export function listAdminLoginRecordData(data) {
  return request({
    url: '/otherSetting/listAdminLoginRecordData',
    method: 'post',
    data
  })
}

/** *严正声明***/
export function setStrictAndUpright(data) {
  return request({
    url: '/otherSetting/setStrictAndUpright',
    method: 'post',
    data
  })
}

export function getStrictAndUpright(data) {
  return request({
    url: '/otherSetting/getStrictAndUpright',
    method: 'post',
    data
  })
}

//  友情提示
// 列表
export function listReminderSetting(data) {
  return request({
    url: 'reminderSetting/listReminderSetting',
    method: 'post',
    data
  })
}
// 添加
export function saveReminderSetting(data) {
  return request({
    url: 'reminderSetting/saveReminderSetting',
    method: 'post',
    data
  })
}
// 修改
export function updateReminderSetting(data) {
  return request({
    url: 'reminderSetting/updateReminderSetting',
    method: 'post',
    data
  })
}
// 删除
export function deleteReminderSetting(id) {
  return request({
    url: 'reminderSetting/deleteReminderSetting',
    method: 'post',
    data: { id }
  })
}
// 状态
// {
//   "status":1 // 开  2 关
// }
export function updateReminderSettingStatus(data) {
  return request({
    url: 'reminderSetting/updateReminderSettingStatus',
    method: 'post',
    data
  })
}
// 获取短信接收人信息
export function getAllopatricMobileCode(data) {
  return request({
    url: '/otherSetting/getAllopatricMobileCode',
    method: 'post',
    data
  })
}
// 添加短信接收人信息
export function setAllopatricMobileCode(data) {
  return request({
    url: '/otherSetting/setAllopatricMobileCode',
    method: 'post',
    data
  })
}

/** *注销协议***/
export function setCanceAgreement(data) {
  return request({
    url: '/otherSetting/setCanceAgreement',
    method: 'post',
    data
  })
}